<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
 <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
 <TITLE>The VFLib Graph Matching Library, version 2.0: VFLib class reference : Class AllocationPool&lt;T, CHUNK_SIZE&gt;</TITLE>
 <LINK HREF="vflib-27.html" REL=next>
 <LINK HREF="vflib-25.html" REL=previous>
 <LINK HREF="vflib.html#toc4" REL=contents>
</HEAD>
<BODY>
<A HREF="vflib-27.html">Next</A>
<A HREF="vflib-25.html">Previous</A>
<A HREF="vflib.html#toc4">Contents</A>
<HR>
<H2>4.14 Class <CODE>AllocationPool&lt;T, CHUNK_SIZE&gt;</CODE></H2>

<P><B>Defined in:</B>  allocpool.h
<P><B>Extends:</B> Allocator&lt;T&gt;
<P><B>Overview:</B>
An allocation pool allocates together chunks of values of type T, instead
of allocating one value at a time. This reduce the memory waste for
small objects (since usually the memory actually consumed is always
a multiple of 8 or 16, no matters the size of the object), and can be
also quite faster.
<P>The drawback is that the values cannot be disposed singularly. Actually,
they are owned by the AllocationPool object, and are freed when
the AllocationPool is disposed. Be careful to never deallocate the
AllocationPool before you have finished with the objects allocated through
it.
<P>
<P>
<P>
<P>
<HR>
<A HREF="vflib-27.html">Next</A>
<A HREF="vflib-25.html">Previous</A>
<A HREF="vflib.html#toc4">Contents</A>
</BODY>
</HTML>
